import sys
import ctypes


def printRed(mess):
    STD_OUTPUT_HANDLE = -11
    FOREGROUND_RED = 0x0c  # red.
    std_out_handle = ctypes.windll.kernel32.GetStdHandle(STD_OUTPUT_HANDLE)
    ctypes.windll.kernel32.SetConsoleTextAttribute(std_out_handle, FOREGROUND_RED)
    sys.stdout.write(mess + '\n')


def printGreen(mess):
    STD_OUTPUT_HANDLE = -11
    FOREGROUND_GREEN = 0x0a  # green.
    std_out_handle = ctypes.windll.kernel32.GetStdHandle(STD_OUTPUT_HANDLE)
    ctypes.windll.kernel32.SetConsoleTextAttribute(std_out_handle, FOREGROUND_GREEN)
    sys.stdout.write(mess + '\n')


def printBlue(mess):
    STD_OUTPUT_HANDLE = -11
    FOREGROUND_BLUE = 0x09  # blue.
    std_out_handle = ctypes.windll.kernel32.GetStdHandle(STD_OUTPUT_HANDLE)
    ctypes.windll.kernel32.SetConsoleTextAttribute(std_out_handle, FOREGROUND_BLUE)
    sys.stdout.write(mess + '\n')


def printYellow(mess):
    STD_OUTPUT_HANDLE = -11
    FOREGROUND_YELLOW = 0x0e  # yellow.
    std_out_handle = ctypes.windll.kernel32.GetStdHandle(STD_OUTPUT_HANDLE)
    ctypes.windll.kernel32.SetConsoleTextAttribute(std_out_handle, FOREGROUND_YELLOW)
    sys.stdout.write(mess + '\n')


def printWhite(mess):
    STD_OUTPUT_HANDLE = -11
    FOREGROUND_WHITE = 0x0f  # white.
    std_out_handle = ctypes.windll.kernel32.GetStdHandle(STD_OUTPUT_HANDLE)
    ctypes.windll.kernel32.SetConsoleTextAttribute(std_out_handle, FOREGROUND_WHITE)
    sys.stdout.write(mess + '\n')
